[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  RANGE             Compiler errors.

  Clipper Version  1.03 dtd 09/15/90.

  Problem Statements

  1) RANGE compiler error (C2010) when GET <Var> is an array element.

    Using @ <row>, <col> GET <Var> RANGE <lo>, <hi>   OR
    Using @ <row>, <col> GET <Var> PICTURE .. RANGE <lo>, <hi> OR
    Using @ <row>, <col> SAY <cString> GET <Var> PICTURE .. RANGE <hi>, <lo>

    returns a compiler error if the <Var> is an array element.

  2) WHEN RANGE  ( Not Implemented, contrary to documentation.)

    Using @ <row>, <col> GET <Var> PICTURE .. WHEN <cond> RANGE <lo>, <hi>
                             OR
    Using @ <row>, <col> SAY <cString> GET <Var> PICTURE .. WHEN <cond> ;
    RANGE <hi>, <lo>

    returns a compiler error, whereas the documentation reflects that
    RANGE | VALID may be used.

  Cause

  1) Pre-processor action.
  2) Not implemented in STD.CH

  Work Around(s)

  1 & 2) Edit MYNAME.CH lines per the following:

#command @ <row>, <col> GET <var> [PICTURE <pic>] ;
             [RANGE <lo>, <hi>] [WHEN <when>] ;
=> ;
         SetPos(<row>, <col>) ;;
         AAdd( GetList, _GET_(<var>, <(var)>, <pic>, ;
        {|_1, _2| RangeCheck(_1, _2, <lo>, <hi>)}, <{when}>) )

#command @ <row>, <col> SAY <sayxpr> [PICTURE <saypic>] ;
         GET <var> [PICTURE <pic>] [RANGE <lo>, <hi>] [WHEN <when>] ;
=> ;
         @ <row>, <col> SAY <sayxpr> [PICTURE <saypic>] ;;
         @ Row(), Col()+1 GET <var> [PICTURE <pic>] ;
          [RANGE <lo>, <hi>] [WHEN <when>];

  Note:

  The documentation lists the useage as RANGE or VALID. The above two
  changes bring the action into compliance with the documentation. The
  following 4 changes to MYNAME.CH, submitted by John Beckner, will
  permit both RANGE and VALID to be used concurrently:

 #command @ <row>, <col>;
          GET <var> [PICTURE <getpic>] [WHEN <when>] [RANGE <lo>, <hi>];
 =>;
          @ <row>, <col> GET <var> [PICTURE <getpic>] [WHEN <when>];
          [VALID {|_1| _1 >= <lo> .and. _1 <= <hi>}]

 #command @ <row>, <col>;
          GET <var> [PICTURE <getpic>] [WHEN <when>];
          [RANGE <lo>, <hi> VALID <valid>];
 =>;
          @ <row>, <col> GET <var> [PICTURE <getpic>] [WHEN <when>];
          [VALID {|_1| (<valid>) .and. _1 >= <lo> .and. _1 <= <hi>}]

 #command @ <row>, <col> SAY <sayexpr> [PICTURE <saypic>];
          GET <var> [PICTURE <getpic>] [WHEN <when>] [RANGE <lo>, <hi>];
 =>;
          @ <row>, <col> SAY <sayexpr> [PICTURE <saypic>];;
          @ <row>, col()+1 GET <var> [PICTURE <getpic>] <WHEN <when>];
          [VALID {|_1| _1 >= <lo> .and. _1 <= <hi>}]

 #command @ <row>, <col> SAY <sayexpr> [PICTURE <saypic>];
          GET <var> [PICTURE <getpic>] [WHEN <when>];
          [RANGE <lo>, <hi> VALID <valid>];
 =>;
          @ <row>, <col> SAY <sayexpr> [PICTURE <saypic>];;
          @ <row>, col()+1 GET <var> [PICTURE <getpic>] [WHEN <when>];
          [VALID {|_1| (<valid>) .and. _1 >= <lo> .and. _1 <= <hi>}]

See Also: STD.CH
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson